<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude #-}</span><span>
</span><span id="line-2"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- Module      :  GHC.IO.Types</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- Copyright   :  (c) Tamar Christina 2018</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-7"></span><span class="hs-comment">--</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Stability   :  experimental</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Portability :  non-portable</span><span>
</span><span id="line-11"></span><span class="hs-comment">--</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Abstraction over C Handle types for GHC, Unix wants FD (CInt) while Windows</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Wants Handle (CIntPtr), so we abstract over them here.</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Event.Internal.Types</span><span>
</span><span id="line-18"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-19"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Event type</span></span><span>
</span><span id="line-20"></span><span>      </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier">Event</span></a></span><span>
</span><span id="line-21"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtRead"><span class="hs-identifier">evtRead</span></a></span><span>
</span><span id="line-22"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtWrite"><span class="hs-identifier">evtWrite</span></a></span><span>
</span><span id="line-23"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtClose"><span class="hs-identifier">evtClose</span></a></span><span>
</span><span id="line-24"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtNothing"><span class="hs-identifier">evtNothing</span></a></span><span>
</span><span id="line-25"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#eventIs"><span class="hs-identifier">eventIs</span></a></span><span>
</span><span id="line-26"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Lifetimes</span></span><span>
</span><span id="line-27"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Lifetime"><span class="hs-identifier">Lifetime</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#EventLifetime"><span class="hs-identifier">EventLifetime</span></a></span><span>
</span><span id="line-29"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#eventLifetime"><span class="hs-identifier">eventLifetime</span></a></span><span>
</span><span id="line-30"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#elLifetime"><span class="hs-identifier">elLifetime</span></a></span><span>
</span><span id="line-31"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#elEvent"><span class="hs-identifier">elEvent</span></a></span><span>
</span><span id="line-32"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Timeout type</span></span><span>
</span><span id="line-33"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Timeout"><span class="hs-identifier">Timeout</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-34"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-35"></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.OldList.html"><span class="hs-identifier">Data.OldList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.List.html#foldl%27"><span class="hs-identifier">foldl'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#filter"><span class="hs-identifier">filter</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#intercalate"><span class="hs-identifier">intercalate</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#null"><span class="hs-identifier">null</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Bits.html"><span class="hs-identifier">Data.Bits</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bits.html#.%7C."><span class="hs-operator">(.|.)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bits.html#.%26."><span class="hs-operator">(.&amp;.)</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Semigroup.Internal.html"><span class="hs-identifier">Data.Semigroup.Internal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Semigroup.Internal.html#stimesMonoid"><span class="hs-identifier">stimesMonoid</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Show.html"><span class="hs-identifier">GHC.Show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier">Show</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Word.html"><span class="hs-identifier">GHC.Word</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#Word64"><span class="hs-identifier">Word64</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span class="hs-comment">-- | An I\/O event.</span><span>
</span><span id="line-46"></span><span class="hs-keyword">newtype</span><span> </span><span id="Event"><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-var">Event</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Event"><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-var">Event</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-47"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621679552224"><span id="local-6989586621679552228"><span class="annot"><span class="annottext">Event -&gt; Event -&gt; Bool
(Event -&gt; Event -&gt; Bool) -&gt; (Event -&gt; Event -&gt; Bool) -&gt; Eq Event
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Event -&gt; Event -&gt; Bool
$c/= :: Event -&gt; Event -&gt; Bool
== :: Event -&gt; Event -&gt; Bool
$c== :: Event -&gt; Event -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></a></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.4.0.0</span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtNothing"><span class="hs-identifier hs-type">evtNothing</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span>
</span><span id="line-50"></span><span id="evtNothing"><span class="annot"><span class="annottext">evtNothing :: Event
</span><a href="GHC.Event.Internal.Types.html#evtNothing"><span class="hs-identifier hs-var hs-var">evtNothing</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Event
</span><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-var">Event</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-51"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtNothing"><span class="hs-pragma hs-type">evtNothing</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="hs-comment">-- | Data is available to be read.</span><span>
</span><span id="line-54"></span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtRead"><span class="hs-identifier hs-type">evtRead</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span>
</span><span id="line-55"></span><span id="evtRead"><span class="annot"><span class="annottext">evtRead :: Event
</span><a href="GHC.Event.Internal.Types.html#evtRead"><span class="hs-identifier hs-var hs-var">evtRead</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Event
</span><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-var">Event</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-56"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtRead"><span class="hs-pragma hs-type">evtRead</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span class="hs-comment">-- | The file descriptor is ready to accept a write.</span><span>
</span><span id="line-59"></span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtWrite"><span class="hs-identifier hs-type">evtWrite</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span>
</span><span id="line-60"></span><span id="evtWrite"><span class="annot"><span class="annottext">evtWrite :: Event
</span><a href="GHC.Event.Internal.Types.html#evtWrite"><span class="hs-identifier hs-var hs-var">evtWrite</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Event
</span><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-var">Event</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-61"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtWrite"><span class="hs-pragma hs-type">evtWrite</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span class="hs-comment">-- | Another thread closed the file descriptor.</span><span>
</span><span id="line-64"></span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtClose"><span class="hs-identifier hs-type">evtClose</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span>
</span><span id="line-65"></span><span id="evtClose"><span class="annot"><span class="annottext">evtClose :: Event
</span><a href="GHC.Event.Internal.Types.html#evtClose"><span class="hs-identifier hs-var hs-var">evtClose</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Event
</span><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-var">Event</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span>
</span><span id="line-66"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtClose"><span class="hs-pragma hs-type">evtClose</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span class="annot"><a href="GHC.Event.Internal.Types.html#eventIs"><span class="hs-identifier hs-type">eventIs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-69"></span><span id="eventIs"><span class="annot"><span class="annottext">eventIs :: Event -&gt; Event -&gt; Bool
</span><a href="GHC.Event.Internal.Types.html#eventIs"><span class="hs-identifier hs-var hs-var">eventIs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span> </span><span id="local-6989586621679552219"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552219"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span> </span><span id="local-6989586621679552218"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552218"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552219"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552218"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span class="hs-comment">-- | @since 4.4.0.0</span><span>
</span><span id="line-72"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679552212"><span id="local-6989586621679552215"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-73"></span><span>    </span><span id="local-6989586621679552210"><span class="annot"><span class="annottext">show :: Event -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var hs-var hs-var hs-var">show</span></a></span></span><span> </span><span id="local-6989586621679552208"><span class="annot"><span class="annottext">Event
</span><a href="#local-6989586621679552208"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'['</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; String
forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="Data.OldList.html#intercalate"><span class="hs-identifier hs-var">intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;,&quot;</span></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; String)
-&gt; ([String] -&gt; [String]) -&gt; [String] -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Bool) -&gt; [String] -&gt; [String]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; (String -&gt; Bool) -&gt; String -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. [a] -&gt; Bool
</span><a href="GHC.List.html#null"><span class="hs-identifier hs-var">null</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([String] -&gt; String) -&gt; [String] -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-74"></span><span>                    </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Event
</span><a href="GHC.Event.Internal.Types.html#evtRead"><span class="hs-identifier hs-var">evtRead</span></a></span><span> </span><span class="annot"><span class="annottext">Event -&gt; ShowS
</span><a href="#local-6989586621679552205"><span class="hs-operator hs-var">`so`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;evtRead&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-75"></span><span>                     </span><span class="annot"><span class="annottext">Event
</span><a href="GHC.Event.Internal.Types.html#evtWrite"><span class="hs-identifier hs-var">evtWrite</span></a></span><span> </span><span class="annot"><span class="annottext">Event -&gt; ShowS
</span><a href="#local-6989586621679552205"><span class="hs-operator hs-var">`so`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;evtWrite&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-76"></span><span>                     </span><span class="annot"><span class="annottext">Event
</span><a href="GHC.Event.Internal.Types.html#evtClose"><span class="hs-identifier hs-var">evtClose</span></a></span><span> </span><span class="annot"><span class="annottext">Event -&gt; ShowS
</span><a href="#local-6989586621679552205"><span class="hs-operator hs-var">`so`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;evtClose&quot;</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;]&quot;</span></span><span>
</span><span id="line-77"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679552204"><span class="annot"><span class="annottext">Event
</span><a href="#local-6989586621679552204"><span class="hs-identifier hs-var">ev</span></a></span></span><span> </span><span id="local-6989586621679552205"><span class="annot"><span class="annottext">so :: Event -&gt; ShowS
</span><a href="#local-6989586621679552205"><span class="hs-operator hs-var hs-var">`so`</span></a></span></span><span> </span><span id="local-6989586621679552203"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679552203"><span class="hs-identifier hs-var">disp</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Event
</span><a href="#local-6989586621679552208"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Event -&gt; Event -&gt; Bool
</span><a href="GHC.Event.Internal.Types.html#eventIs"><span class="hs-operator hs-var">`eventIs`</span></a></span><span> </span><span class="annot"><span class="annottext">Event
</span><a href="#local-6989586621679552204"><span class="hs-identifier hs-var">ev</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679552203"><span class="hs-identifier hs-var">disp</span></a></span><span>
</span><span id="line-78"></span><span>                           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span class="hs-comment">-- | @since 4.10.0.0</span><span>
</span><span id="line-81"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679552200"><span class="annot"><a href="GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-82"></span><span>    </span><span id="local-6989586621679552197"><span class="annot"><span class="annottext">&lt;&gt; :: Event -&gt; Event -&gt; Event
</span><a href="GHC.Base.html#%3C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;&gt;)</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Event -&gt; Event -&gt; Event
</span><a href="GHC.Event.Internal.Types.html#evtCombine"><span class="hs-identifier hs-var">evtCombine</span></a></span><span>
</span><span id="line-83"></span><span>    </span><span id="local-6989586621679552192"><span class="annot"><span class="annottext">stimes :: forall b. Integral b =&gt; b -&gt; Event -&gt; Event
</span><a href="GHC.Base.html#stimes"><span class="hs-identifier hs-var hs-var hs-var hs-var">stimes</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">b -&gt; Event -&gt; Event
forall b a. (Integral b, Monoid a) =&gt; b -&gt; a -&gt; a
</span><a href="Data.Semigroup.Internal.html#stimesMonoid"><span class="hs-identifier hs-var">stimesMonoid</span></a></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="hs-comment">-- | @since 4.4.0.0</span><span>
</span><span id="line-86"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679552186"><span class="annot"><a href="GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-87"></span><span>    </span><span id="local-6989586621679552183"><span class="annot"><span class="annottext">mempty :: Event
</span><a href="GHC.Base.html#mempty"><span class="hs-identifier hs-var hs-var hs-var hs-var">mempty</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Event
</span><a href="GHC.Event.Internal.Types.html#evtNothing"><span class="hs-identifier hs-var">evtNothing</span></a></span><span>
</span><span id="line-88"></span><span>    </span><span id="local-6989586621679552182"><span class="annot"><span class="annottext">mconcat :: [Event] -&gt; Event
</span><a href="GHC.Base.html#mconcat"><span class="hs-identifier hs-var hs-var hs-var hs-var">mconcat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Event] -&gt; Event
</span><a href="GHC.Event.Internal.Types.html#evtConcat"><span class="hs-identifier hs-var">evtConcat</span></a></span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtCombine"><span class="hs-identifier hs-type">evtCombine</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span>
</span><span id="line-91"></span><span id="evtCombine"><span class="annot"><span class="annottext">evtCombine :: Event -&gt; Event -&gt; Event
</span><a href="GHC.Event.Internal.Types.html#evtCombine"><span class="hs-identifier hs-var hs-var">evtCombine</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span> </span><span id="local-6989586621679552180"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552180"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span> </span><span id="local-6989586621679552179"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552179"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Event
</span><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-var">Event</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552180"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552179"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-92"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtCombine"><span class="hs-pragma hs-type">evtCombine</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtConcat"><span class="hs-identifier hs-type">evtConcat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span>
</span><span id="line-95"></span><span id="evtConcat"><span class="annot"><span class="annottext">evtConcat :: [Event] -&gt; Event
</span><a href="GHC.Event.Internal.Types.html#evtConcat"><span class="hs-identifier hs-var hs-var">evtConcat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Event -&gt; Event -&gt; Event) -&gt; Event -&gt; [Event] -&gt; Event
forall a b. (b -&gt; a -&gt; b) -&gt; b -&gt; [a] -&gt; b
</span><a href="GHC.List.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">Event -&gt; Event -&gt; Event
</span><a href="GHC.Event.Internal.Types.html#evtCombine"><span class="hs-identifier hs-var">evtCombine</span></a></span><span> </span><span class="annot"><span class="annottext">Event
</span><a href="GHC.Event.Internal.Types.html#evtNothing"><span class="hs-identifier hs-var">evtNothing</span></a></span><span>
</span><span id="line-96"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#evtConcat"><span class="hs-pragma hs-type">evtConcat</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span class="hs-comment">-- | The lifetime of an event registration.</span><span>
</span><span id="line-99"></span><span class="hs-comment">--</span><span>
</span><span id="line-100"></span><span class="hs-comment">-- @since 4.8.1.0</span><span>
</span><span id="line-101"></span><span class="hs-keyword">data</span><span> </span><span id="Lifetime"><span class="annot"><a href="GHC.Event.Internal.Types.html#Lifetime"><span class="hs-identifier hs-var">Lifetime</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="OneShot"><span class="annot"><a href="GHC.Event.Internal.Types.html#OneShot"><span class="hs-identifier hs-var">OneShot</span></a></span></span><span>   </span><span class="hs-comment">-- ^ the registration will be active for only one</span><span>
</span><span id="line-102"></span><span>                          </span><span class="hs-comment">-- event</span><span>
</span><span id="line-103"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="MultiShot"><span class="annot"><a href="GHC.Event.Internal.Types.html#MultiShot"><span class="hs-identifier hs-var">MultiShot</span></a></span></span><span> </span><span class="hs-comment">-- ^ the registration will trigger multiple times</span><span>
</span><span id="line-104"></span><span>              </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span id="local-6989586621679552171"><span id="local-6989586621679552173"><span id="local-6989586621679552175"><span class="annot"><span class="annottext">Int -&gt; Lifetime -&gt; ShowS
[Lifetime] -&gt; ShowS
Lifetime -&gt; String
(Int -&gt; Lifetime -&gt; ShowS)
-&gt; (Lifetime -&gt; String) -&gt; ([Lifetime] -&gt; ShowS) -&gt; Show Lifetime
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [Lifetime] -&gt; ShowS
$cshowList :: [Lifetime] -&gt; ShowS
show :: Lifetime -&gt; String
$cshow :: Lifetime -&gt; String
showsPrec :: Int -&gt; Lifetime -&gt; ShowS
$cshowsPrec :: Int -&gt; Lifetime -&gt; ShowS
</span><a href="GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.8.1.0</span><span>
</span><span id="line-105"></span><span>                       </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679552167"><span id="local-6989586621679552169"><span class="annot"><span class="annottext">Lifetime -&gt; Lifetime -&gt; Bool
(Lifetime -&gt; Lifetime -&gt; Bool)
-&gt; (Lifetime -&gt; Lifetime -&gt; Bool) -&gt; Eq Lifetime
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Lifetime -&gt; Lifetime -&gt; Bool
$c/= :: Lifetime -&gt; Lifetime -&gt; Bool
== :: Lifetime -&gt; Lifetime -&gt; Bool
$c== :: Lifetime -&gt; Lifetime -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></a></span></span></span><span>   </span><span class="hs-comment">-- ^ @since 4.8.1.0</span><span>
</span><span id="line-106"></span><span>                       </span><span class="hs-special">)</span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="hs-comment">-- | The longer of two lifetimes.</span><span>
</span><span id="line-109"></span><span class="annot"><a href="GHC.Event.Internal.Types.html#elSupremum"><span class="hs-identifier hs-type">elSupremum</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Lifetime"><span class="hs-identifier hs-type">Lifetime</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Lifetime"><span class="hs-identifier hs-type">Lifetime</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Lifetime"><span class="hs-identifier hs-type">Lifetime</span></a></span><span>
</span><span id="line-110"></span><span id="elSupremum"><span class="annot"><span class="annottext">elSupremum :: Lifetime -&gt; Lifetime -&gt; Lifetime
</span><a href="GHC.Event.Internal.Types.html#elSupremum"><span class="hs-identifier hs-var hs-var">elSupremum</span></a></span></span><span> </span><span class="annot"><span class="annottext">Lifetime
</span><a href="GHC.Event.Internal.Types.html#OneShot"><span class="hs-identifier hs-var">OneShot</span></a></span><span> </span><span class="annot"><span class="annottext">Lifetime
</span><a href="GHC.Event.Internal.Types.html#OneShot"><span class="hs-identifier hs-var">OneShot</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Lifetime
</span><a href="GHC.Event.Internal.Types.html#OneShot"><span class="hs-identifier hs-var">OneShot</span></a></span><span>
</span><span id="line-111"></span><span class="annot"><a href="GHC.Event.Internal.Types.html#elSupremum"><span class="hs-identifier hs-var">elSupremum</span></a></span><span> </span><span class="annot"><span class="annottext">Lifetime
</span><span class="hs-identifier">_</span></span><span>       </span><span class="annot"><span class="annottext">Lifetime
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Lifetime
</span><a href="GHC.Event.Internal.Types.html#MultiShot"><span class="hs-identifier hs-var">MultiShot</span></a></span><span>
</span><span id="line-112"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#elSupremum"><span class="hs-pragma hs-type">elSupremum</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span class="hs-comment">-- | @since 4.10.0.0</span><span>
</span><span id="line-115"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679552163"><span class="annot"><a href="GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Lifetime"><span class="hs-identifier hs-type">Lifetime</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-116"></span><span>    </span><span id="local-6989586621679552161"><span class="annot"><span class="annottext">&lt;&gt; :: Lifetime -&gt; Lifetime -&gt; Lifetime
</span><a href="GHC.Base.html#%3C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Lifetime -&gt; Lifetime -&gt; Lifetime
</span><a href="GHC.Event.Internal.Types.html#elSupremum"><span class="hs-identifier hs-var">elSupremum</span></a></span><span>
</span><span id="line-117"></span><span>    </span><span id="local-6989586621679552157"><span class="annot"><span class="annottext">stimes :: forall b. Integral b =&gt; b -&gt; Lifetime -&gt; Lifetime
</span><a href="#local-6989586621679552157"><span class="hs-identifier hs-var hs-var hs-var hs-var">stimes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">b -&gt; Lifetime -&gt; Lifetime
forall b a. (Integral b, Monoid a) =&gt; b -&gt; a -&gt; a
</span><a href="Data.Semigroup.Internal.html#stimesMonoid"><span class="hs-identifier hs-var">stimesMonoid</span></a></span><span>
</span><span id="line-118"></span><span>
</span><span id="line-119"></span><span class="hs-comment">-- | @mappend@ takes the longer of two lifetimes.</span><span>
</span><span id="line-120"></span><span class="hs-comment">--</span><span>
</span><span id="line-121"></span><span class="hs-comment">-- @since 4.8.0.0</span><span>
</span><span id="line-122"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679552150"><span id="local-6989586621679552152"><span class="annot"><a href="GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Lifetime"><span class="hs-identifier hs-type">Lifetime</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-123"></span><span>    </span><span id="local-6989586621679552149"><span class="annot"><span class="annottext">mempty :: Lifetime
</span><a href="GHC.Base.html#mempty"><span class="hs-identifier hs-var hs-var hs-var hs-var">mempty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Lifetime
</span><a href="GHC.Event.Internal.Types.html#OneShot"><span class="hs-identifier hs-var">OneShot</span></a></span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span class="hs-comment">-- | A pair of an event and lifetime</span><span>
</span><span id="line-126"></span><span class="hs-comment">--</span><span>
</span><span id="line-127"></span><span class="hs-comment">-- Here we encode the event in the bottom three bits and the lifetime</span><span>
</span><span id="line-128"></span><span class="hs-comment">-- in the fourth bit.</span><span>
</span><span id="line-129"></span><span class="hs-keyword">newtype</span><span> </span><span id="EventLifetime"><span class="annot"><a href="GHC.Event.Internal.Types.html#EventLifetime"><span class="hs-identifier hs-var">EventLifetime</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="EL"><span class="annot"><a href="GHC.Event.Internal.Types.html#EL"><span class="hs-identifier hs-var">EL</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-130"></span><span>                      </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span id="local-6989586621679552138"><span id="local-6989586621679552140"><span id="local-6989586621679552146"><span class="annot"><span class="annottext">Int -&gt; EventLifetime -&gt; ShowS
[EventLifetime] -&gt; ShowS
EventLifetime -&gt; String
(Int -&gt; EventLifetime -&gt; ShowS)
-&gt; (EventLifetime -&gt; String)
-&gt; ([EventLifetime] -&gt; ShowS)
-&gt; Show EventLifetime
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [EventLifetime] -&gt; ShowS
$cshowList :: [EventLifetime] -&gt; ShowS
show :: EventLifetime -&gt; String
$cshow :: EventLifetime -&gt; String
showsPrec :: Int -&gt; EventLifetime -&gt; ShowS
$cshowsPrec :: Int -&gt; EventLifetime -&gt; ShowS
</span><a href="GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.8.0.0</span><span>
</span><span id="line-131"></span><span>                               </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679552132"><span id="local-6989586621679552136"><span class="annot"><span class="annottext">EventLifetime -&gt; EventLifetime -&gt; Bool
(EventLifetime -&gt; EventLifetime -&gt; Bool)
-&gt; (EventLifetime -&gt; EventLifetime -&gt; Bool) -&gt; Eq EventLifetime
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: EventLifetime -&gt; EventLifetime -&gt; Bool
$c/= :: EventLifetime -&gt; EventLifetime -&gt; Bool
== :: EventLifetime -&gt; EventLifetime -&gt; Bool
$c== :: EventLifetime -&gt; EventLifetime -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></a></span></span></span><span>   </span><span class="hs-comment">-- ^ @since 4.8.0.0</span><span>
</span><span id="line-132"></span><span>                               </span><span class="hs-special">)</span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span class="hs-comment">-- | @since 4.11.0.0</span><span>
</span><span id="line-135"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679552124"><span id="local-6989586621679552126"><span class="annot"><a href="GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#EventLifetime"><span class="hs-identifier hs-type">EventLifetime</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-136"></span><span>    </span><span class="annot"><a href="GHC.Event.Internal.Types.html#EL"><span class="hs-identifier hs-type">EL</span></a></span><span> </span><span id="local-6989586621679552122"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552122"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679552121"><span class="annot"><span class="annottext">&lt;&gt; :: EventLifetime -&gt; EventLifetime -&gt; EventLifetime
</span><a href="GHC.Base.html#%3C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;&gt;</span></a></span></span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#EL"><span class="hs-identifier hs-type">EL</span></a></span><span> </span><span id="local-6989586621679552120"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552120"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; EventLifetime
</span><a href="GHC.Event.Internal.Types.html#EL"><span class="hs-identifier hs-var">EL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552122"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552120"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-139"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679552113"><span id="local-6989586621679552115"><span class="annot"><a href="GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#EventLifetime"><span class="hs-identifier hs-type">EventLifetime</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-140"></span><span>    </span><span id="local-6989586621679552112"><span class="annot"><span class="annottext">mempty :: EventLifetime
</span><a href="GHC.Base.html#mempty"><span class="hs-identifier hs-var hs-var hs-var hs-var">mempty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; EventLifetime
</span><a href="GHC.Event.Internal.Types.html#EL"><span class="hs-identifier hs-var">EL</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-141"></span><span>
</span><span id="line-142"></span><span class="annot"><a href="GHC.Event.Internal.Types.html#eventLifetime"><span class="hs-identifier hs-type">eventLifetime</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Lifetime"><span class="hs-identifier hs-type">Lifetime</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#EventLifetime"><span class="hs-identifier hs-type">EventLifetime</span></a></span><span>
</span><span id="line-143"></span><span id="eventLifetime"><span class="annot"><span class="annottext">eventLifetime :: Event -&gt; Lifetime -&gt; EventLifetime
</span><a href="GHC.Event.Internal.Types.html#eventLifetime"><span class="hs-identifier hs-var hs-var">eventLifetime</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span> </span><span id="local-6989586621679552111"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552111"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679552110"><span class="annot"><span class="annottext">Lifetime
</span><a href="#local-6989586621679552110"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; EventLifetime
</span><a href="GHC.Event.Internal.Types.html#EL"><span class="hs-identifier hs-var">EL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552111"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Lifetime -&gt; Int
forall {p}. Num p =&gt; Lifetime -&gt; p
</span><a href="#local-6989586621679552109"><span class="hs-identifier hs-var">lifetimeBit</span></a></span><span> </span><span class="annot"><span class="annottext">Lifetime
</span><a href="#local-6989586621679552110"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-144"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-145"></span><span>    </span><span id="local-6989586621679552109"><span class="annot"><span class="annottext">lifetimeBit :: Lifetime -&gt; p
</span><a href="#local-6989586621679552109"><span class="hs-identifier hs-var hs-var">lifetimeBit</span></a></span></span><span> </span><span class="annot"><span class="annottext">Lifetime
</span><a href="GHC.Event.Internal.Types.html#OneShot"><span class="hs-identifier hs-var">OneShot</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">p
</span><span class="hs-number">0</span></span><span>
</span><span id="line-146"></span><span>    </span><span class="annot"><a href="#local-6989586621679552109"><span class="hs-identifier hs-var">lifetimeBit</span></a></span><span> </span><span class="annot"><span class="annottext">Lifetime
</span><a href="GHC.Event.Internal.Types.html#MultiShot"><span class="hs-identifier hs-var">MultiShot</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">p
</span><span class="hs-number">8</span></span><span>
</span><span id="line-147"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#eventLifetime"><span class="hs-pragma hs-type">eventLifetime</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span class="annot"><a href="GHC.Event.Internal.Types.html#elLifetime"><span class="hs-identifier hs-type">elLifetime</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#EventLifetime"><span class="hs-identifier hs-type">EventLifetime</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Lifetime"><span class="hs-identifier hs-type">Lifetime</span></a></span><span>
</span><span id="line-150"></span><span id="elLifetime"><span class="annot"><span class="annottext">elLifetime :: EventLifetime -&gt; Lifetime
</span><a href="GHC.Event.Internal.Types.html#elLifetime"><span class="hs-identifier hs-var hs-var">elLifetime</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Internal.Types.html#EL"><span class="hs-identifier hs-type">EL</span></a></span><span> </span><span id="local-6989586621679552105"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552105"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552105"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Lifetime
</span><a href="GHC.Event.Internal.Types.html#OneShot"><span class="hs-identifier hs-var">OneShot</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Lifetime
</span><a href="GHC.Event.Internal.Types.html#MultiShot"><span class="hs-identifier hs-var">MultiShot</span></a></span><span>
</span><span id="line-151"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#elLifetime"><span class="hs-pragma hs-type">elLifetime</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-152"></span><span>
</span><span id="line-153"></span><span class="annot"><a href="GHC.Event.Internal.Types.html#elEvent"><span class="hs-identifier hs-type">elEvent</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#EventLifetime"><span class="hs-identifier hs-type">EventLifetime</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-type">Event</span></a></span><span>
</span><span id="line-154"></span><span id="elEvent"><span class="annot"><span class="annottext">elEvent :: EventLifetime -&gt; Event
</span><a href="GHC.Event.Internal.Types.html#elEvent"><span class="hs-identifier hs-var hs-var">elEvent</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Internal.Types.html#EL"><span class="hs-identifier hs-type">EL</span></a></span><span> </span><span id="local-6989586621679552104"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552104"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Event
</span><a href="GHC.Event.Internal.Types.html#Event"><span class="hs-identifier hs-var">Event</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552104"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x7</span></span><span class="hs-special">)</span><span>
</span><span id="line-155"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.Internal.Types.html#elEvent"><span class="hs-pragma hs-type">elEvent</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span class="hs-comment">-- | A type alias for timeouts, specified in nanoseconds.</span><span>
</span><span id="line-158"></span><span class="hs-keyword">data</span><span> </span><span id="Timeout"><span class="annot"><a href="GHC.Event.Internal.Types.html#Timeout"><span class="hs-identifier hs-var">Timeout</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Timeout"><span class="annot"><a href="GHC.Event.Internal.Types.html#Timeout"><span class="hs-identifier hs-var">Timeout</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span>
</span><span id="line-159"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span id="Forever"><span class="annot"><a href="GHC.Event.Internal.Types.html#Forever"><span class="hs-identifier hs-var">Forever</span></a></span></span><span>
</span><span id="line-160"></span><span>               </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621679552093"><span id="local-6989586621679552095"><span id="local-6989586621679552100"><span class="annot"><span class="annottext">Int -&gt; Timeout -&gt; ShowS
[Timeout] -&gt; ShowS
Timeout -&gt; String
(Int -&gt; Timeout -&gt; ShowS)
-&gt; (Timeout -&gt; String) -&gt; ([Timeout] -&gt; ShowS) -&gt; Show Timeout
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [Timeout] -&gt; ShowS
$cshowList :: [Timeout] -&gt; ShowS
show :: Timeout -&gt; String
$cshow :: Timeout -&gt; String
showsPrec :: Int -&gt; Timeout -&gt; ShowS
$cshowsPrec :: Int -&gt; Timeout -&gt; ShowS
</span><a href="GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.4.0.0</span><span>
</span><span id="line-161"></span></pre></body></html>